package my.cloud.study.service;

import my.cloud.study.User;
import my.cloud.study.hystrix.HelloHystrixFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Service
@FeignClient(name = "eureka-provider", fallbackFactory = HelloHystrixFallbackFactory.class)
public interface HelloRemoteService {

    @GetMapping("/usr")
    User userInfo();

    @GetMapping("info/{id}")
    String info(@PathVariable("id") String id);
}
